import pygame
import sys
import time
from snake import Snake
from utils import *
from pygame.locals import *

pygame.init()
pygame.display.set_caption('Paint')
screen = pygame.display.set_mode((640,480))
screen.fill((255,255,255))
move_down = False			
snake = Snake()
snake2 = Snake()
snake2.y = 300

while True:	
	for event in pygame.event.get():
#		print ( 'event.type = ' + str(event.type) )
		if event.type == KEYDOWN:
			try:
				print ( 'event.key (char) = ' + chr(event.key)  + ', event.key (number) ' + str( event.key ) )
			except:
				print ( 'event.key (number) ' + str( event.key ) )
			if event.key == ord('q'):
				sys.exit()
			if event.key == 274 :
				move_down = True
			
	#if ( move_down ):
	#	t = t + 1			
	#else:	#	i = i + 1 
	paint_screen(screen)
	snake.draw(screen)	
	snake2.draw(screen)
	pygame.display.update()
		
